package com.example.ordersystem.utils;

import android.content.Context;

import com.example.ordersystem.R;
import com.example.ordersystem.pojo.Food;
import com.example.ordersystem.pojo.Store;

import java.util.ArrayList;
import java.util.List;

//模拟后台服务器初始化店铺列表信息，初始化菜单信息

public class InitMthod {

    private static List<Store> storeList = new ArrayList<>();
    private static List<Food> foodList = new ArrayList<>();


    public static void getStoreList(Context context) {
        initStores();
        ListDataSave.putStoreBean(context, storeList);
    }

    public static void getMenuList(Context context) {
        initMenu1();
        ListDataSave.putMenuBean(context, foodList, "香格里拉饭店");
        initMenu2();
        ListDataSave.putMenuBean(context, foodList, "姚记烧鹅");
        initMenu3();
        ListDataSave.putMenuBean(context, foodList, "重庆鸡公煲");
        initMenu4();
        ListDataSave.putMenuBean(context, foodList, "圣保罗自助餐厅");
        initMenu5();
        ListDataSave.putMenuBean(context, foodList, "安纳西法式音乐餐厅");
    }


    //初始化饭店
    private static void initStores() {

        storeList.clear();
        Store store0 = new Store("香格里拉饭店", 1, R.drawable.store1);
        storeList.add(store0);
        Store store1 = new Store("姚记烧鹅", 2, R.drawable.store2);
        storeList.add(store1);
        Store store2 = new Store("重庆鸡公煲", 3, R.drawable.store3);
        storeList.add(store2);
        Store store3 = new Store("圣保罗自助餐厅", 4, R.drawable.store4);
        storeList.add(store3);
        Store store4 = new Store("安纳西法式音乐餐厅", 5, R.drawable.store5);
        storeList.add(store4);
    }

    private static void initMenu1() {
        foodList.clear();
        Food food0 = new Food("三文鱼刺身", "刺身非常鲜美", 24, R.drawable.gulurou, 1);
        foodList.add(food0);
        Food food1 = new Food("牛排套餐", "牛排外焦里嫩非常不错", 98, R.drawable.hanbaobao, 1);
        foodList.add(food1);
        Food food2 = new Food("鸡翅拼盘", "量多不贵，非常划算", 56, R.drawable.jichi, 1);
        foodList.add(food2);

    }


    private static void initMenu2() {
        foodList.clear();
        Food food0 = new Food("梅汁烧鸭套餐", "皮酥肉厚，料汁很好吃", 16, R.drawable.dalongxia, 2);
        foodList.add(food0);
        Food food1 = new Food("卤鸡腿拼烧鸭套餐", "很不错，管饱实惠", 19, R.drawable.douyachaorou, 2);
        foodList.add(food1);
        Food food2 = new Food("单点鸡腿", "鸡腿很好吃", 8, R.drawable.jitui, 2);
        foodList.add(food2);

    }

    private static void initMenu3() {
        foodList.clear();
        Food food0 = new Food("鸡公煲小份", "鸡肉很嫩，配菜很多", 15, R.drawable.hexia, 3);
        foodList.add(food0);
        Food food1 = new Food("猪蹄套餐", "猪蹄很香", 25, R.drawable.lanmeimianbao, 3);
        foodList.add(food1);
        Food food2 = new Food("排骨煲", "猪排真好吃啊", 19, R.drawable.niupai, 3);
        foodList.add(food2);

    }

    private static void initMenu4() {
        foodList.clear();
        Food food0 = new Food("单人套餐", "酒水畅饮很不错", 49, R.drawable.yarou, 4);
        foodList.add(food0);
        Food food1 = new Food("双人套餐", "烤羊排味道好极了", 89, R.drawable.dapangxie, 4);
        foodList.add(food1);
        Food food2 = new Food("豪华四人享", "海鲜很新鲜，菜品也很多", 199, R.drawable.tangshi, 4);
        foodList.add(food2);

    }

    private static void initMenu5() {
        foodList.clear();
        Food food0 = new Food("战斧牛排", "牛排超级多，鲜嫩多汁", 128, R.drawable.xiarou, 5);
        foodList.add(food0);
        Food food1 = new Food("芝士焗龙虾", "龙虾非常好吃", 249, R.drawable.yidielonngxia, 5);
        foodList.add(food1);
        Food food2 = new Food("炭烤鱿鱼", "鱿鱼真好吃啊", 88, R.drawable.youyu, 5);
        foodList.add(food2);

    }

}